/*
 * @Author: Jian SuiYue kaohx0214@yeah.net
 * @Date: 2025-06-04 07:55:33
 * @LastEditTime: 2025-06-04 07:57:26
 * @FilePath: src/main/java/com/tencent/wxcloudrun/exception/GlobalExceptionHandler.java
 */
package com.tencent.wxcloudrun.exception;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice
public class GlobalExceptionHandler {
    
    @ExceptionHandler(EnumException.class)
    public ResponseEntity<String> handleEnumException(EnumException ex){
        return ResponseEntity.badRequest().body(ex.getMessage());
    }
}
